package system1

import (
	v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type WorkflowLogRouter struct {
}

// InitWorkflowLogRouter 初始化 审批历史 路由信息
func (s *WorkflowLogRouter) InitWorkflowLogRouter(Router *gin.RouterGroup) {
	WorkflowLogRouter := Router.Group("WorkflowLog").Use(middleware.OperationRecord())
	WorkflowLogRouterWithoutRecord := Router.Group("WorkflowLog")
	var WorkflowLogApi = v1.ApiGroupApp.System1ApiGroup.WorkflowLogApi
	{
		WorkflowLogRouter.POST("createWorkflowLog", WorkflowLogApi.CreateWorkflowLog)             // 新建审批历史
		WorkflowLogRouter.DELETE("deleteWorkflowLog", WorkflowLogApi.DeleteWorkflowLog)           // 删除审批历史
		WorkflowLogRouter.DELETE("deleteWorkflowLogByIds", WorkflowLogApi.DeleteWorkflowLogByIds) // 批量删除审批历史
		WorkflowLogRouter.PUT("updateWorkflowLog", WorkflowLogApi.UpdateWorkflowLog)              // 更新审批历史
	}
	{
		WorkflowLogRouterWithoutRecord.GET("findWorkflowLog", WorkflowLogApi.FindWorkflowLog)       // 根据ID获取审批历史
		WorkflowLogRouterWithoutRecord.GET("getWorkflowLogList", WorkflowLogApi.GetWorkflowLogList) // 获取审批历史列表
	}
}
